<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App\Models\Traits\Filters;

class ShopProfit extends Model
{
    use Filters;

    protected $table = 'shop_profit';

    protected static function add_log($user_id, $shop_id, $shop_role, $money, $comment = "")
    {
        ShopProfit::insert([
            'user_id' => $user_id,
            'shop_id' => $shop_id,
            'shop_role' => $shop_role,
            'money' => $money,
            'comment' => $comment,
            'created_at' => date('Y-m-d H:i:s'),
            'updated_at' => date('Y-m-d H:i:s'),
        ]);
    }
}
